<div class="main-content grid_5 alpha">
  <header>
    <div class="action-buttons clearfix fr">
      <a href="<?php echo bu("admin/webinars/new"); ?>" class="button button-gray"><span class="add"></span>New Webinars</a>
    </div>
    <h2>Webinars</h2>
  </header>

  <section>
    <?php echo $this->renderPartial('/partials/_notifications'); ?>

		<table class="datatable paginate sortable full">
			<thead>
				<tr>
					<th>Subject</th>
					<th>For</th>
					<th>Created At</th>
					<th>Modified At</th>
					<th style="width:70px"></th>
				</tr>
			</thead>
			<tbody>
				<?php foreach ($webinars as $webinar){ ?>
				<tr>
					<td align="center"><?php echo $webinar->subject; ?></td>
					<td align="center"><?php if(isset($webinar->member)){ echo $webinar->member->name; }else{ echo "Everyone"; } ?></td>
					<td align="center"><?php echo Helpers::customDate($webinar->created_at); ?></td>
					<td align="center"><?php echo Helpers::customDate($webinar->modified_at); ?></td>
					<td>
						<ul class="action-buttons">
							<li><a href="<?php echo bu('admin/webinars/edit'); ?>?id=<?php echo $webinar->id; ?>" class="button button-gray no-text"><span class="pencil"></span>Edit</a></li>
							<li><a href="<?php echo bu('admin/webinars/delete'); ?>?id=<?php echo $webinar->id; ?>" method="POST" class="button button-gray no-text"><span class="bin"></span>Delete</a></li>
						</ul>
					</td>
				</tr>
				<?php } ?>
			</tbody>
		</table>
  </section>
</div>